<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>connection &#8212; Connection with Database &mdash; Interop Router 3.30 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '0',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="top" title="Interop Router 3.30 documentation" href="../index.html" />
    <link rel="up" title="Aangel Documentation" href="index.html" />
    <link rel="prev" title="aangel &#8212; Aangel Main" href="aangel.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="aangel.html" title="aangel &#8212; Aangel Main"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Interop Router 3.30 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Aangel Documentation</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  
  <div class="section" id="module-connection">
<h1><tt class="xref docutils literal"><span class="pre">connection</span></tt> &#8212; Connection with Database<a class="headerlink" href="#module-connection" title="Permalink to this headline">¶</a></h1>
<p>This module connects the Aangel and the SQL Database.</p>
<p>It very similar with the Deemon&#8217;s module connectSQL, but the methods are
diferent and, since in a computer with Aangel the Deemon may be not installed,
we chose to not unify the modules.</p>
<p>Like Deemon SQL connection, in version 3.1, the SQL Database is a MySQL server 
and uses the MySQLdb module.</p>
<p>It&#8217;s possible extend it to others SQL Databases, like PostgreeSQL or SQL Server.</p>
<dl class="class">
<dt id="connection.Connection">
<!--[connection.Connection]-->class <tt class="descname">Connection</tt><big>(</big><em>params</em><big>)</big><a class="headerlink" href="#connection.Connection" title="Permalink to this definition">¶</a></dt>
<dd><p>The SQL Database interface.</p>
<p>This Class has methods to get data of jobs to give a cluster ID,
get the clusters with free resources, and send the results back to database.</p>
<p>In the future, will able to connect using several sql engines.</p>
<dl class="method">
<dt id="connection.Connection.closeConn">
<!--[connection.Connection.closeConn]--><tt class="descname">closeConn</tt><big>(</big><big>)</big><a class="headerlink" href="#connection.Connection.closeConn" title="Permalink to this definition">¶</a></dt>
<dd>Close the connection with de SQL Database.</dd></dl>

<dl class="method">
<dt id="connection.Connection.getClusters">
<!--[connection.Connection.getClusters]--><tt class="descname">getClusters</tt><big>(</big><big>)</big><a class="headerlink" href="#connection.Connection.getClusters" title="Permalink to this definition">¶</a></dt>
<dd><p>Capture clusters that can get jobs.</p>
<p>To do so, takes into account the table field that 
displays the free system resources.</p>
</dd></dl>

<dl class="method">
<dt id="connection.Connection.getJobs">
<!--[connection.Connection.getJobs]--><tt class="descname">getJobs</tt><big>(</big><big>)</big><a class="headerlink" href="#connection.Connection.getJobs" title="Permalink to this definition">¶</a></dt>
<dd><p>Capture jobs can be schedule.</p>
<p>In version 1.0, only verify the jobs with cluster id = 0.
Later, will reschedule jobs that have not were captured by its cluster.</p>
</dd></dl>

<dl class="method">
<dt id="connection.Connection.sendResults">
<!--[connection.Connection.sendResults]--><tt class="descname">sendResults</tt><big>(</big><em>jobList</em><big>)</big><a class="headerlink" href="#connection.Connection.sendResults" title="Permalink to this definition">¶</a></dt>
<dd>Send the list of jobs with the clusterId&#8217;s to the database.</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h4>Previous topic</h4>
            <p class="topless"><a href="aangel.html" title="previous chapter"><tt class="docutils literal docutils literal"><span class="pre">aangel</span></tt> &#8212; Aangel Main</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/aangel/connect.txt">Show Source</a></li>
            </ul>
          <h3>Quick search</h3>
            <form class="search" action="../search.html" method="get">
              <input type="text" name="q" size="18" /> <input type="submit" value="Go" />
              <input type="hidden" name="check_keywords" value="yes" />
              <input type="hidden" name="area" value="default" />
            </form>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="aangel.html" title="aangel &#8212; Aangel Main"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Interop Router 3.30 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Aangel Documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright .
      Last updated on Dec 17, 2008.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.5.
    </div>
  </body>
</html>